/*
 * @file gkt_window_system.h
 */

#ifndef GKT_WINDOW_SYSTEM_H
#define GKT_WINDOW_SYSTEM_H

#include "gkt_types.h"

#ifdef __cplusplus
extern "C" {
#endif

#if defined(GKT_CONFIG_SLIDING_CLOSURE_ENABLE)	&& GKT_CONFIG_SLIDING_CLOSURE_ENABLE
#include "gkt_sliding_closure.h"
#endif

/* window system event */
enum {
	GKT_WINDOW_SYSTEM_DOOR = 0,
	GKT_WINDOW_SYSTEM_SLIDING_CLOSURE,
	GKT_WINDOW_SYSTEM_FACTORY_RESET,
	GKT_WINDOW_SYSTEM_BACKBOARD,
	GKT_WINDOW_SYSTEM_CAT_EYE,
	GKT_WINDOW_SYSTEM_NETWORK,
	GKT_WINDOW_SYSTEM_INDOOR_BELL,
	GKT_WINDOW_SYSTEM_MAX
};

int gkt_window_system_init(void);

void gkt_window_system_pending_process(void);

void gkt_window_system_standby_enable(void);
void gkt_window_system_standby_disable(void);
void gkt_window_system_standby(int force);

void gkt_window_system_reset(void);

#if defined(GKT_CONFIG_WINDOW_ALWAYS_OPEN_MODE_ENABLE) \
	&& GKT_CONFIG_WINDOW_ALWAYS_OPEN_MODE_ENABLE
void gkt_window_system_door_set_always_open_state(int state);
#else
#define gkt_window_system_door_set_always_open_state(state)	\
	do { gkt_unused(state); } while (0)
#endif

int gkt_window_system_is_standby_pending(void);

#ifdef __cplusplus
}
#endif

#endif	/* GKT_WINDOW_SYSTEM_H */

